1. Technical Field
The present invention relates to image text smoothing. More particularly, the present invention relates to a method and apparatus for producing text images with improved smoothness in horizontal, vertical, and slanted edges, and for hole mending and dot removal.
2. Description of the Prior Art
Text or pictorial images are often replicated or transmitted by a variety of techniques, such as photocopying, facsimile transmission, and scanning images into a memory device. The process of replication or transmission often tends to degrade the resulting image due to a variety of factors. Degraded images are characterized by indistinct or shifted edges, blended or otherwise connected characters and distorted shapes.
A reproduced or transmitted image that is degraded in quality may be unusable in certain applications. For example, if the reproduced or transmitted image is to be used in conjunction with a character recognition apparatus, the indistinct edges, connected characters, etc. may preclude accurate or successful recognition of characters in the image. Also, if the degraded image is printed or otherwise rendered visible, the image may be more difficult to read and less pleasing to the eye.
There are several approaches to improve image quality. A classical resolution enhancement algorithm for example, is template matching. Template matching attempts to match a line, curve pattern, or linear pattern and then tries to find the best way to reconstruct it with the printing resolution.
However, after an image has been reconstructed using an enhancement technique, jagged outlines, holes, and undesired dots may still occur in the resulting reconstructed image. It is desirable to smooth these unwanted jagged outlines, and to eliminate unwanted holes and dots.
The prior art teaches smoothing techniques only for corners and diagonals. Also, the prior art assumes one-bit input. The prior art was used primarily within or in conjunction with resealing processes.
H. Yamashita, M. Matsumiya, and T. Fukushima, Image Data Processing Apparatus, U.S. Pat. No. 5,559,530 (Sep. 24, 1996) discloses an image data processing apparatus for generating a font with contour lines expressed with gradations that comprises a font ROM for storing a binary font data. An output port is provided for reading a target pixel with ambient pixels arranged in a 3xc3x973 matrix of the binary font data stored in the font ROM. A shift register produces an address data based on the binary data read from the font ROM. A look-up table has 23xc3x973 elements in which multilevel values are commensurate with the pixel patterns included in the 3xc3x973 matrix. One data of the multilevel data is output from the look-up table by designating one element by said address data, and is used as a gradation data of the target pixel. Thus, the font pixel can be expressed with a gradation and the jagged contour of the font is reduced.
The Yamashita et al teachings assume smoothing bit-map image data. That is, Yamashita et alteaches generating multilevel data values from bit-map image data values wherein the bit-map image data values correspond to respective pixels. Each of the pixels has a respective binary level and includes four sub-areas, each of which correspond to a respective sub-pixel.
Also, Yamashita et al teaches a conversion table having 23xc3x973 elements, wherein each one of said 23xc3x973 elements includes a set of density data values that are arranged in a 2xc3x972 matrix and in a predetermined order. The density data values are calculated from the percentage of the black area of a sub-area of each of the sub-pixels, wherein the area is based on one or more main contour lines which is predicted from the positions of black pixels in the matrix-shaped area, and the sub-pixels, being 2xc3x972 sub-divisions of the pixel area of the target pixel.
L. Zeng, Improved character smoothing in scanners/printers, European Patent Application EP 0 719 034 A1, (Jun. 12, 1995) discloses a scanner/printer system for smoothing the edges of text or line art. The system has a copyboard for an image bearing an original, a CCD, a PCI bus, a processor which uses edge smooth software and a laser printer. The edge smooth software adds variable size fill-in patterns of pixels to the image data scanned by the CCD at low resolution to smooth the edges of text or line art prior to printing at high resolution.
Zeng teaches smoothing curves and diagonals, and smoothing many different sizes of corners and chinks, and using one-bit printing. The Zeng teachings require orientation estimation for many different angles.
It would be advantageous to provide a method and apparatus that minimizes the modification of data, i.e. is as faithful to the original input as possible.
It would be advantageous to provide a method and apparatus that recognizes and handles outliers or degraded, jaggy or otherwise corrupt original data, especially with respect to vertical and horizontal edges.
It would be advantageous to provide a method and apparatus that recognizes and handles outliers or degraded, jaggy, or otherwise corrupt original data from non-ideal source inputs, such as, for example half-tone text edges or scanned text.
It would be advantageous to provide a method and apparatus that is fast, simple, and flexible.
It would be advantageous to provide a method and apparatus that provides general enhancements comprising, for example, hole-filling, isolated dot removal, and anti-aliasing.
It would be advantageous to provide a conversion table that is organized by jaggy levels with a preference for minimal change. That is, jaggy level zero dominates.
It would be advantageous to provide a conversion table that provides a final output ink level for a center pixel as a function of its original ink level, and as a function of the surrounding ink and background pattern. Such table provides substantially different output ink from other tables for a particular ink and background pattern, depending on the original center ink level.
It would be advantageous to provide a conversion table and its use by organizing the table efficiently into distinct patterns using concepts of rotation, reflection, and complements.
Methods and apparatus are provided to smooth a jagged outline of reconstructed text generated through any of a variety of systems, such as, for example, an image scanner. Given the reconstructed text with a jagged outline, the methods smooth the outline of the text first through location of horizontal and vertical edges, and subsequent gray scale reconstruction of the edge ink level from a one-bit or a low number of bits edge pattern. The methods then provide identification of the local text outline pattern and corresponding ink level adjustment of the center pixel. The methods produce text having very smooth horizontal and vertical edges. The methods then smooth slanted edges, mend holes in the text, and remove isolated pixels of ink.